unit mystringutils;

interface

uses
  System.SysUtils;

function ToUTF8Encode(str: string): string;

implementation

function ToUTF8Encode(str: string): string;
var
  b: Byte;
begin
  for b in BytesOf(UTF8Encode(str)) do
    Result := Format('%s%%%.2x', [Result, b]);
end;

end.

